package com.example.demo.controller;

import com.example.demo.entity.Category;
import com.example.demo.entity.Image;
import com.example.demo.mapper.CategoryMapper;
import com.example.demo.mapper.ImageMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/getCategory")
public class CategoryController {

    @Resource
    CategoryMapper categoryMapper;

    @GetMapping("/getCategory")
    public List<Category> getImage(){
        return categoryMapper.findAll();
    }
}
